<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>JavaScript 对象</title>
</head>
<body>
<h2>对象定义/创建</h2>
<p id="demo"></p>
<script>
  var person={firstName:"Bill",lastName:"Gates",age:33,
  eyeColor:"blue"};

  document.getElementById("demo").innerHTML=person.firstName+"已经"+person.age+"岁了。";

</script>


</body>
</html>

<!--空格和折行都是允许的。对象定义可横跨多行-->